POV-Ray : Newsgroups : povray.newusers : Grass (New Problem) : Re: Grass (New Problem) Server Time
30 Jul 2024 20:18:46 EDT (-0400)
  Re: Grass (New Problem)  
From: Brent G
Date: 17 Sep 2003 20:31:11
Message: <3f68fccf@news.povray.org>
Christopher James Huff wrote:

> In article <3f68b72f$1@news.povray.org>, Brent G <pov### [at] bc-hqcom> 
> wrote:
> 
> 
>>Yay :) Sorry I'm bugging you all with so many questions but . . . I got 
>>a question. Using Gilles' MakeGrass macro, I've created a nice patch of 
>>grass, only problem is that it's a mesh 100k some triangles (Yikes) and 
>>in relation to the rest of my scene it's a small portion, so I'll have 
>>to use alot of these patches . . now herein lies the problem, having to 
>>parse 100k triangles a few hundred times is . . . not good? I'm sure I'm 
>>missing something obvious here. . . .
> 
> 
> You only parse it once, and use multiple copies of it. Actually, you 
> should make several different patches, and pick from them randomly to 
> avoid tiling artifacts.
> 
> When copying a mesh, POV will keep just one instance of the actual mesh 
> data. 100 copies of that 100K triangle mesh will store 100K triangles 
> and their associated data and 100 references to that data. This is what 
> makes meshes so useful for grass.
> 

   object {
     #include "fgrass1.inc"

     texture {
       pigment {
         dents
         triangle_wave
         color_map {
           [0.0 rgb <0.0, 0.4, 0.1>]
           [1.0 rgb <0.1, 0.6, 0.2>]
         }
       }
     }
     scale 0.08
     translate <0.5,0.6,-8.0>
   }

Would that be correct then? Just alternate the #include line between 
grass patches?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.